qx.Class.define("ui.service.LoginService", {
			extend : qx.core.Object,
			members : {
				login : function(username, password, onSuccess, onFailure, window) {
					var req = new qx.io.request.Xhr("/rpc/login", "POST");
					var params = {
						"uid" : username,
						"pwd" : password
					};
					var resp = null;
					req.setRequestData(params);
					req.send();
					req.addListener("success", function(e) {
								var req = e.getTarget();
								resp = req.getResponse();
								if(resp.respuesta){
									window.close();
									onSuccess(resp.bienvenida);
								} else {
									onFailure(resp.causa);
								}
							}, this);
				}
			}
		});